package com.translate.commons.service;

import java.util.List;
import java.util.Map;

public class BaseUtilService {
    protected boolean empty(String str) {
        if (str == null || str.trim().length() == 0) {
            return true;
        }
        return false;
    }

    protected <T> boolean empty(List<T> ts) {
        if (ts == null || ts.size() == 0) {
            return true;
        }
        return false;
    }

    protected <T> boolean empty(T[] arr) {
        if (arr == null || arr.length == 0) {
            return true;
        }
        return false;
    }

    protected <T> boolean empty(byte[] arr) {
        if (arr == null || arr.length == 0) {
            return true;
        }
        return false;
    }

    protected <T> boolean empty(Map map) {
        if (map == null || map.size() == 0) {
            return true;
        }
        return false;
    }
}
